<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Aquamat: Plik źródłowy log.h (r58/r57)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Wygenerowano przez Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="pages.html"><span>Dodatkowe&nbsp;strony</span></a></li>
      <li><a href="annotated.html"><span>Struktury&nbsp;Danych</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<h1>log.h (r58/r57)</h1><a href="log_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001     <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Aquamat - Sterownik akwariowy Open Source</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2009 Wojciech Todryk (wojciech@todryk.pl)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00018"></a>00018 <span class="comment">    </span>
<a name="l00019"></a>00019 <span class="comment">    $Id$</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef LOG_MODULE_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define LOG_MODULE_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00029"></a><a class="code" href="log_8h.html#a007db90eda5214d16ba4c0a3f772e3d9">00029</a> <span class="preprocessor">#define LOG_READ_ADDR   0xA9</span>
<a name="l00030"></a><a class="code" href="log_8h.html#a9aad172562ea398f97434d861d8cd9f3">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_WRITE_ADDR   0xA8</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00034"></a><a class="code" href="log_8h.html#ae67e1112574921478e7c609f31da7137">00034</a> <span class="preprocessor">#define LOG_RECORD_CLEAR_MAX 25</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00038"></a><a class="code" href="log_8h.html#a3aed387643bbf867d58d9966808fade9">00038</a> <span class="preprocessor">#define LOG_LAST_RECORD_NUMBER 1023</span>
<a name="l00039"></a><a class="code" href="log_8h.html#ac6aeac4f131bc8ca8436384155d584a3">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_FIRST_RECORD_NUMBER 1</span>
<a name="l00040"></a><a class="code" href="log_8h.html#a5f04b1963a51a0184e4fc5bdc3ec8fda">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_CONTROL_RECORD_NUMBER 0</span>
<a name="l00041"></a><a class="code" href="log_8h.html#a1aaa28eef96f20ff1a57578bd6b52913">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_BYTES_PER_RECORD 8</span>
<a name="l00042"></a><a class="code" href="log_8h.html#a3842545574e0dc363291d2b34c46c4b8">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_CONTROL_POINTER_LSB 6</span>
<a name="l00043"></a><a class="code" href="log_8h.html#a56bc3b0d1adcb24b63076f64f8f7f9b5">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_CONTROL_POINTER_MSB 7</span>
<a name="l00044"></a><a class="code" href="log_8h.html#ad5d55a95f7f88a405344dbde0d139484">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define LOG_WRITE_DELAY 10</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a><a class="code" href="log_8h.html#a1a314660a9444ad962406d8f7616061f">00046</a> <span class="preprocessor">#define FIRST_WORD(addr) ((uint8_t)((addr*LOG_BYTES_PER_RECORD)&gt;&gt;8))</span>
<a name="l00047"></a><a class="code" href="log_8h.html#ae811faec72dd2e1350ab185476c90d1b">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define SECOND_WORD(addr) ((uint8_t)(addr*LOG_BYTES_PER_RECORD))</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 uint16_t <a class="code" href="log_8c.html#a3738b2ee3ff807b7d474a41d2e3ac718">log_read_pointer</a>(<span class="keywordtype">void</span>);
<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#ae936d9a5aed8334fd48eb6951c71e4d5">log_read_record_at_pointer</a>(uint16_t,uint8_t *);
<a name="l00051"></a>00051 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#a06b5b6528e09e9739123d051949bfef5">log_clear_record</a> (uint16_t);
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#a7ec3e7bfdff671647c3b5f970e269416">log_clear</a>(<span class="keywordtype">void</span>);
<a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#a2e029451a7bcce372537c4c50805a4df">log_write_pointer</a>(uint16_t);
<a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#adc6300536924bb78d7e3d0edff452241">log_write_record</a>(uint8_t,uint8_t,uint8_t, uint8_t);
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="log_8c.html#a88d1aa3d831dc4457de385a06552303b">log_write_record_at_pointer</a>(uint16_t,uint8_t,uint8_t,uint8_t,uint8_t);
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="keyword">extern</span> uint8_t <a class="code" href="log_8c.html#affc83957945e425377d69c855b6efb49" title="Bufor do przechowania zdarzenia z logu.">logbuff</a>[8];
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1">
<div style="text-align: center;">
<small>Projekt udostępniony jest na zasadach Open Source. Zapoznaj się z warunkami licencji w pliku COPYING znajdujacym się w katalogu głównym.	</small>
</div>

<hr size="1">
<div style="text-align: center;">
Aquamat - sterownik akwarystyczny Open Source
<br/>
Copyright (C) 2009  <a href="http://todryk.pl">Wojciech Todryk</a> (wojciech(at)todryk(dot)pl)
</div>

<div style="text-align: right;">
<small>Dokumentację wygenerowano za pomocą programu&nbsp;</small>
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
<small> wersja 1.6.1 (Fri Apr 23 22:48:16 2010)&nbsp;</small>
</div>
